# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=granatier
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/games/org.kde.granatier"
pkgdesc="A clone of the classic Bomberman game"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev kcoreaddons-dev kconfig-dev kcrash-dev kdbusaddons-dev kwidgetsaddons-dev kconfig-dev ki18n-dev kconfigwidgets-dev kxmlgui-dev knewstuff-dev kdoctools-dev libkdegames-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/granatier-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="612395ddca651052a8ffae48a3e977780297c0ef397946705baf735cdf447a0a782c4a0299cab496332592d0aac33000de969978669c4b8122e2353429e17613  granatier-20.04.3.tar.xz"
